package com.janushuang.designpattern.decorator;

/**
 * @author zhijing.huang
 *         Created by zhijing.huang on 2014/9/28.
 */
public class Client {
    public static void createComponent() {
        Component component = new ConcreteComponent();
        component.operation();
    }
    public static void createComponentWithDecorator1() {
        Component component = new ConcreteDecorator1(new ConcreteComponent(),"decoration1");
        component.operation();
    }
    public static void createComponentWithDecorator2() {
        Component component = new ConcreteDecorator2(new ConcreteComponent(),"decoration2");
        component.operation();
    }
}
